package pack0621;

public class ZueYe1 {
    public static void main(String[] args){
        /*int a=1,b=1,c=2,n;
        for (n=3;n<=30;n++){
            c=a+b;
            a=b;
            b=c;
            System.out.println(c);
        }
        if (n==30);
        System.out.println("数列第30位数是："+c);
    }*/

        int []a=new int[30];
        a[0]=1;a[1]=1;
        for (int n=2;n<30;n++){
            a[n]=a[n-1]+a[n-2];

        }
        System.out.println(a[29]);
    }
}
